PROJECT( httplib )
cmake_minimum_required(VERSION 2.8)
SET( DIR_OUTPUT output )
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${DIR_OUTPUT})
SET( BIN_NAME ${DIR_OUTPUT}/test_httplib )

INCLUDE_DIRECTORIES( include )
INCLUDE_DIRECTORIES( /home/img/libs/boost/include )

AUX_SOURCE_DIRECTORY( src DIR_SRCS )
ADD_EXECUTABLE( ${BIN_NAME} ${DIR_SRCS} )
SET( DIR_BOOST_LIB /home/img/libs/boost/lib )

if( LINUX )
	FIND_LIBRARY(BOOST_SYSTEM boost_system ${DIR_BOOST_LIB} NO_DEFAULT_PATH )
	FIND_LIBRARY(BOOST_REGEX boost_regex ${DIR_BOOST_LIB} NO_DEFAULT_PATH )
elseif( APPLE )
	FIND_LIBRARY(BOOST_SYSTEM boost_system-mt ${DIR_BOOST_LIB} )
	FIND_LIBRARY(BOOST_REGEX boost_regex-mt ${DIR_BOOST_LIB} )
endif()

TARGET_LINK_LIBRARIES( ${BIN_NAME} ${BOOST_SYSTEM} ${BOOST_REGEX})
